<!--
  * 业务员退款明细
  *
-->
<template>
  <div>
    <a-table :dataSource="tableData" :columns="columns" :pagination="false" rowKey="id" size="small" bordered />
  </div>
</template>
<script setup lang="ts">
  const props = defineProps({
    enterpriseId: {
      type: Array,
      default: null,
    },
  });

  const columns = reactive([
    {
      title: '门店名称',
      dataIndex: ['store', 'name'],
    },
    {
      title: '退款金额',
      dataIndex: 'money',
    },
    {
      title: '退款时间',
      dataIndex: 'create_time',
    },
  ]);
  const tableData = ref([]);

  watch(
    () => props.enterpriseId,
    (e) => {
      if (e) {
        tableData.value = e;
      }
    },
    { immediate: true }
  );
</script>
